//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { Vmc, VmcResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooVmcList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<VmcResponse>(`/uctoo/vmc/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooVmc = async (id: string) => {
  return requestClient.get<Vmc>(`/uctoo/vmc/${id}`);
};

export const adductooVmc = async (data: Partial<Vmc>) => {
  return requestClient.post<Vmc>('/uctoo/vmc/add', data);
};

export const edituctooVmc = async (data: Partial<Vmc>) => {
  return requestClient.post<Vmc>('/uctoo/vmc/edit', data);
};

export const deleteuctooVmc = async (id: string) => {
  return requestClient.post<any>('/uctoo/vmc/del', { id });
};
